package com.sevens.service.impl;

import java.util.List;

import com.sevens.dao.FacilityDao;
import com.sevens.service.FacilityService;
import com.sevens.vo.Facility;

public class FacilityServiceImpl implements FacilityService{
	
	private FacilityDao facilityDao;

	public FacilityDao getFacilityDao() {
		return facilityDao;
	}
	
	public void setFacilityDao(FacilityDao facilityDao) {
		this.facilityDao = facilityDao;
	}
	
	@Override
	public boolean saveFacility(Facility facility) {
		if(facilityDao.saveFacility(facility)!= null)
			return true;
		else
			return false;
	}
	
	public List<Facility> queryFacility(Facility facility) {
		
		return this.facilityDao.queryFacility(facility);
	}

	public List<Facility> queryAllFacility() {
		
		return this.facilityDao.queryAllFacility();
	}


	public Facility queryFacilityById(int facilityId) {
		
		Facility facility=this.facilityDao.queryFacilityById(facilityId);
		return facility;
	}

	public boolean deleteFacility(Facility facility) {
		boolean bool = this.facilityDao.deleteFacility(facility);
		return bool;
	}


	public boolean editFacility(Facility facility) {
		boolean bool = this.facilityDao.editFacility(facility);
		return bool;
	}

	public boolean deleteFacilityById(int facilityId) {
		boolean bool = this.facilityDao.deleteFacilityById(facilityId);
		return bool;
	}

	

}
